class CreateFragments < ActiveRecord::Migration
  def self.up
    create_table :fragments do |t|
      t.column :content, :string   #Even one charachter is allowed. Maybe it wll be a goog fragmet.
      t.column :novel_id, :integer
      t.column :user_id, :integer # Can be null. Allow anonymous user to write the novel.
      t.column :fragment_number, :integer #Which bat for the novel
      t.column :merge, :integer #Indicate the fragment is merged to novel or not
      t.timestamps
    end
  end

  def self.down
    drop_table :fragments
  end
end
